Micron Document
`:top
In `F33f`_`[computer programming`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_programming]`_`f, a `!programming language implementation`! is a system for executing `F33f`_`[computer programs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_programs]`_`f. There are two general approaches to programming language implementation:`:cite-ref-rantabook-1-0[`F5bf`_`[1`#cite-note-rantabook-1]`_`f]

• `*`F33f`_`[Interpretation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Interpreter_(computing)]`_`f:`* The program is read as input by an interpreter, which performs the actions written in the program.`:cite-ref-languagegreg-2-0[`F5bf`_`[2`#cite-note-languagegreg-2]`_`f]
• `*`F33f`_`[Compilation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Compiler]`_`f:`* The program is read by a compiler, which translates it into some other language, such as `F33f`_`[bytecode`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bytecode]`_`f or `F33f`_`[machine code`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Machine_code]`_`f. The translated code may either be directly `F33f`_`[executed`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Execution_(computing)]`_`f by hardware or serve as input to another interpreter or another compiler.`:cite-ref-languagegreg-2-1[`F5bf`_`[2`#cite-note-languagegreg-2]`_`f]

>>Contents

• `F0af`_`[Interpreter`#interpreter]`_`f
• `F0af`_`[Virtual machine`#virtual-machine]`_`f
• `F0af`_`[Just-in-time compiler`#just-in-time-compiler]`_`f
• `F0af`_`[Compiler`#compiler]`_`f
• `F0af`_`[Multiple implementations`#multiple-implementations]`_`f
• `F0af`_`[References`#references]`_`f
• `F0af`_`[External links`#external-links]`_`f

-─

>>Interpreter

An `F33f`_`[interpreter`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Interpreter_(computing)]`_`f is composed of two parts: a `F33f`_`[parser`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Parser]`_`f and an `F33f`_`[evaluator`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Evaluator]`_`f. After a program is read as input by an interpreter, it is processed by the parser. The parser breaks the program into `F33f`_`[language components`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Syntax_(programming_languages)]`_`f to form a `F33f`_`[parse tree`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Parse_tree]`_`f. The evaluator then uses the parse tree to execute the program.`:cite-ref-introtocomputing-3-0[`F5bf`_`[3`#cite-note-introtocomputing-3]`_`f]

>>>Virtual machine

A `F33f`_`[virtual machine`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Virtual_machine]`_`f is a special type of interpreter that interprets bytecode.`:cite-ref-languagegreg-2-2[`F5bf`_`[2`#cite-note-languagegreg-2]`_`f] Bytecode is a `F33f`_`[portable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cross-platform_software]`_`f low-level code similar to machine code, though it is generally executed on a virtual machine instead of a physical machine.`:cite-ref-makeuseofvm-4-0[`F5bf`_`[4`#cite-note-makeuseofvm-4]`_`f] To improve their efficiencies, many programming languages such as `F33f`_`[Java`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Java_(programming_language)]`_`f,`:cite-ref-makeuseofvm-4-1[`F5bf`_`[4`#cite-note-makeuseofvm-4]`_`f] `F33f`_`[Python`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Python_(programming_language)]`_`f,`:cite-ref-pythonbytecode-5-0[`F5bf`_`[5`#cite-note-pythonbytecode-5]`_`f] and `F33f`_`[C#`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_Sharp_(programming_language)]`_`f`:cite-ref-clr-6-0[`F5bf`_`[6`#cite-note-clr-6]`_`f] are compiled to bytecode before being interpreted.

>>>Just-in-time compiler

Some virtual machines include a `F33f`_`[just-in-time (JIT) compiler`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Just-in-time_compilation]`_`f to improve the efficiency of bytecode execution. While the bytecode is being executed by the virtual machine, if the JIT compiler determines that a portion of the bytecode will be used repeatedly, it compiles that particular portion to machine code. The JIT compiler then stores the machine code in `F33f`_`[memory`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Random-access_memory]`_`f so that it can be used by the virtual machine. JIT compilers try to strike a balance between longer compilation time and faster execution time.`:cite-ref-languagegreg-2-3[`F5bf`_`[2`#cite-note-languagegreg-2]`_`f]

>>Compiler

A `F33f`_`[compiler`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Compiler]`_`f translates programs written in one language into another language. Most compilers are organized into three stages: a `F33f`_`[front end`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Compiler]`_`f, an `F33f`_`[optimizer`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Compiler]`_`f, and a `F33f`_`[back end`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Compiler]`_`f. The front end is responsible for understanding the program. It makes sure a program is valid and transforms it into an `F33f`_`[intermediate representation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Intermediate_representation]`_`f, a data structure used by the compiler to represent the program. The optimizer improves the intermediate representation to increase the speed or reduce the size of the `F33f`_`[executable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Executable]`_`f which is ultimately produced by the compiler. The back end converts the optimized intermediate representation into the output language of the compiler.`:cite-ref-engineeringcompiler-7-0[`F5bf`_`[7`#cite-note-engineeringcompiler-7]`_`f]

If a compiler of a given `F33f`_`[high level language`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=High_level_language]`_`f produces another high level language, it is called a `F33f`_`[transpiler`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Source-to-source_compiler]`_`f. Transpilers can be used to extend existing languages or to simplify compiler development by exploiting `F33f`_`[portable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Software_portability]`_`f and well-optimized implementations of other languages (such as `F33f`_`[C`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_(programming_language)]`_`f).`:cite-ref-languagegreg-2-4[`F5bf`_`[2`#cite-note-languagegreg-2]`_`f]

Many combinations of interpretation and compilation are possible, and many modern programming language implementations include elements of both. For example, the `F33f`_`[Smalltalk`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Smalltalk]`_`f programming language is conventionally implemented by compilation into `F33f`_`[bytecode`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bytecode]`_`f, which is then either interpreted or compiled by a `F33f`_`[virtual machine`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Virtual_machine]`_`f. Since Smalltalk bytecode is run on a virtual machine, it is portable across different hardware platforms.`:cite-ref-smalltalkbook-8-0[`F5bf`_`[8`#cite-note-smalltalkbook-8]`_`f]

>>Multiple implementations

Programming languages can have multiple implementations. Different implementations can be written in different languages and can use different methods to compile or interpret code. For example, implementations of `F33f`_`[Python`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Python_(programming_language)]`_`f include: `:cite-ref-altpython-9-0[`F5bf`_`[9`#cite-note-altpython-9]`_`f]

• `F33f`_`[CPython`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=CPython]`_`f, the `F33f`_`[reference implementation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Reference_implementation]`_`f of Python
• `F33f`_`[IronPython`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=IronPython]`_`f, an implementation targeting the `F33f`_`[.NET Framework`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=.NET_Framework]`_`f (written in `F33f`_`[C#`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_Sharp_(programming_language)]`_`f)
• `F33f`_`[Jython`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Jython]`_`f, an implementation targeting the `F33f`_`[Java virtual machine`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Java_virtual_machine]`_`f
• `F33f`_`[PyPy`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=PyPy]`_`f, an implementation designed for speed (written in RPython)

>>References

`:cite-note-rantabook-1`!1.`! `F0af`_`[↑`#cite-ref-rantabook-1-0]`_`f `:citerefranta2012`aRanta, Aarne (February 6, 2012). `*Implementing Programming Languages`* (PDF). College Publications. pp. 16–18. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 9781848900646. Archived (PDF) from the original on Nov 7, 2020. Retrieved 22 March 2020.
`:cite-note-languagegreg-2`!2.`! `F0af`_`[↑`#cite-ref-languagegreg-2-0]`_`f `:citerefbaker`aBaker, Greg. "Language Implementations". `*Computing Science - Simon Fraser University`*. Archived from the original on Mar 8, 2019. Retrieved 22 March 2020.
`:cite-note-introtocomputing-3`!3.`! `F0af`_`[↑`#cite-ref-introtocomputing-3-0]`_`f `:citerefevans2011`aEvans, David (19 August 2011). `*Introduction to Computing`* (PDF). University of Virginia. p. 211. Retrieved 22 March 2020.
`:cite-note-makeuseofvm-4`!4.`! `F0af`_`[↑`#cite-ref-makeuseofvm-4-0]`_`f `:citerefsridhar2017`aSridhar, Jay (Aug 29, 2017). "Why the Java Virtual Machine Helps Your Code Run Better". `*MakeUseOf`*. Retrieved 22 March 2020.
`:cite-note-pythonbytecode-5`!5.`! `F0af`_`[↑`#cite-ref-pythonbytecode-5-0]`_`f `:citerefbennett2018`aBennett, James (April 23, 2018). "An introduction to Python bytecode". `*Opensource.com`*. Retrieved 22 March 2020.
`:cite-note-clr-6`!6.`! `F0af`_`[↑`#cite-ref-clr-6-0]`_`f `:citerefali2017`aAli, Mirza Farrukh (Oct 12, 2017). "Common Language Runtime(CLR) DotNet". `*Medium`*. Retrieved 22 March 2020.
`:cite-note-engineeringcompiler-7`!7.`! `F0af`_`[↑`#cite-ref-engineeringcompiler-7-0]`_`f `:citerefcoopertorczon2011`aCooper, Keith; Torczon, Linda (7 February 2011). `*Engineering a Compiler`* (2nd ed.). Morgan Kaufmann. pp. 6-9. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 9780120884780.
`:cite-note-smalltalkbook-8`!8.`! `F0af`_`[↑`#cite-ref-smalltalkbook-8-0]`_`f `:citereflewis1995`aLewis, Simon (May 11, 1995). `*The Art and Science of Smalltalk`* (PDF). Prentice Hall. pp. 20–21. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 9780133713459. Retrieved 23 March 2020.
`:cite-note-altpython-9`!9.`! `F0af`_`[↑`#cite-ref-altpython-9-0]`_`f "Alternative Python Implementations". `*Python.org`*. Retrieved 23 March 2020.

>>External links

• Media related to Compiling and linking at Wikimedia Commons

`c`F0af`_`[↑ Back to top`#top]`_`f`a